<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\OmrController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

// 生成 OMR 答题卡的 POST 路由
Route::post('/generate-omr-card', [OmrController::class, 'generateOmrCard']);

// 上传已扫描的 OMR 图像（保存到 omr_output/omr_<test>_<studentId>.png）
Route::post('/upload-omr', [OmrController::class, 'uploadOmrImage']);

// 处理 OMR（调用 resources/code/process_omr.py）并返回处理输出与可视化路径
Route::post('/process-omr', [OmrController::class, 'processOmr']);
